<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>ajaxXML</title>
        <script src="../style/js/jquery.js"></script>
        <script src="../style/js/bt.dwz.js"></script>
    </head>
<script>
    function a(str) {
            alert("接收:"+str);
    }
    function b(str) {
        alert("发送:"+str);
    }
</script>
    <body>
                <div style="margin-top: 15px;">xml类型: <form id="myForm2" action="cd.xml"  beforeSubmit="b(resque)" actionTo="#" dataType="xml" callback="a(respon);" method="post"><div>
                        <input type="hidden" name="Hidden" value="hiddenValue">
                        <table>
                        <tbody><tr><td>Name:</td><td><input name="Name" type="text"  placeholder="姓名 "></td></tr>
                        <tr><td>Password:</td><td><input name="Password" type="password"></td></tr>
                        <tr><td>Multiple:</td><td><select name="Multiple" multiple="multiple">

                            <optgroup label="Group 1">
                                <option value="one" selected="selected">One</option>
                                <option value="two">Two</option>
                                <option value="three">Three</option>
                            </optgroup>
                            <optgroup label="Group 2">
                                <option value="four">Four</option>

                                <option value="five">Five</option>
                                <option value="six">Six</option>
                            </optgroup>
                        </select></td></tr>
                        <tr><td>Single:</td><td><select name="Single">
                            <option value="one" selected="selected">One</option>
                            <option value="two">Two</option>

                            <option value="three">Three</option>
                        </select></td></tr>
                        <tr><td>Single2:</td><td><select name="Single2">
                            <optgroup label="Group 1">
                                <option value="A" selected="selected">A</option>
                                <option value="B">B</option>
                                <option value="C">C</option>
                            </optgroup>
                            <optgroup label="Group 2">
                                <option value="D">D</option>
                                <option value="E">E</option>
                                <option value="F">F</option>
                            </optgroup>
                        </select></td></tr>

                        <tr><td>Check:</td><td>
                            <input type="checkbox" name="Check" value="1">
                            <input type="checkbox" name="Check" value="2">
                            <input type="checkbox" name="Check" value="3">
                        </td></tr>
                        <tr><td>Radio:</td><td>
                            <input type="radio" name="Radio" value="1">
                            <input type="radio" name="Radio" value="2">

                            <input type="radio" name="Radio" value="3">
                        </td></tr>
                        <tr><td>Text:</td><td><textarea name="Text" rows="2" cols="20"  placeholder="This is Form1"></textarea></td></tr>
                        </tbody></table>
                        
                        <input type="image" name="submitButton" value="Submit2" src="submit.gif">
                        <input type="image" name="submitButton" value="Submit3" src="submit.gif">
                        <input type="image" name="submitButton" value="Submit4" src="submit.gif">
                        <button type="reset" class="btn" name="resetButton" value="Reset">Reset</button>
						<button type="submit" class="btn" name="submitButton" value="Submit5">submit</button>
                </div></form>
       </div>

    </body>
    <script>
        // prepare the form when the DOM is ready 
      /*  $(document).ready(function () {     
            var options2 = {
                target: '#output1',   // target element(s) to be updated with server response 
                beforeSubmit: showRequest,  // pre-submit callback 
                success: showResponse,  // post-submit callback 
                dataType: "xml",
                timeout: 3000,
                error: function (e) {
                    alert(e);
                }
            };
            $('#myForm2').ajaxForm(options2);
      
        });

        // pre-submit callback 
        function showRequest(formData, jqForm, options) {
            var queryString = $.param(formData);
            alert('发送:' + queryString);
            return true;
        }

        // post-submit callback 
        function showResponse(responseText, statusText, xhr, $form) {
            alert('状态: ' + statusText + '\n\n返回: \n' + responseText + "\br" + $(this).html());
        }
*/
    </script>
</html>
